Skip to content

fix(records): use header login URL in restricted files notice#807

Closed
TahaKhan998 wants to merge 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/issue-798-restricted-record-login-link
Closed

fix(records): use header login URL in restricted files notice#807
TahaKhan998 wants to merge 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/issue-798-restricted-record-login-link

Conversation

@TahaKhan998

@TahaKhan998 TahaKhan998 commented Jun 4, 2026

Copy link
Copy Markdown

Closes #798
When you're logged out and view a public record with restricted files, the "Log in" link in the red Files notice goes to /account/settings/login instead of the normal login page. This PR fixes that in detail.html by using the same login URL as the header button , so both links go to /login/?next=....

@TahaKhan998 TahaKhan998 force-pushed the fix/issue-798-restricted-record-login-link branch from 9308664 to 24b4e87 Compare June 5, 2026 08:30
@zubeydecivelek zubeydecivelek self-requested a review June 8, 2026 07:35
display_name=display_name) }}
{%- endblock record_file_list -%}

{%- block record_files -%}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

about this one, I have a feeling that we add a lot of code to maintain. Could we have it in RDM instead so we don't need to override this big chunk of a block? it can decrease maintenance effort on CDS side (please check with f.e. @slint first if Zenodo needs this too)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After discussing with Alex, I’ve moved this fix upstream to invenio-rdm-records instead of overriding the block here.
Upstream PR: inveniosoftware/invenio-rdm-records#2360
I am closing this PR.

@TahaKhan998 TahaKhan998 deleted the fix/issue-798-restricted-record-login-link branch June 10, 2026 15:01
@TahaKhan998 TahaKhan998 restored the fix/issue-798-restricted-record-login-link branch June 10, 2026 15:03
@TahaKhan998 TahaKhan998 reopened this Jun 10, 2026
@TahaKhan998 TahaKhan998 force-pushed the fix/issue-798-restricted-record-login-link branch from 4bee510 to cd68a9b Compare June 10, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restricted record "log in" link redirects to wrong page

2 participants